<?php
/**
 * @authors alex (20779512@qq.com)
 * @date    2014-03-24 16:49:33
 * @version 1.0
 */


define('CONF_PATH','./../conf/');			//配置文件目录
$arr = require(CONF_PATH.'/info.php');

$postStr = isset($GLOBALS["HTTP_RAW_POST_DATA"]) ?  $GLOBALS["HTTP_RAW_POST_DATA"]  : "" ;

if (!empty($postStr)){
	//libxml_disable_entity_loader(true);
	$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);

	if ($postObj->result_code == 'SUCCESS') {
		
	    $url = $arr['site_url'].'/index.php?g=Wap&m=payreturn&a=wxnotice&order_no='.$postObj->out_trade_no;
	    //echo "success";
	    header("Location: $url"); 
	}
	
}

?>